package com.worldcup.dao.relation;

import com.worldcup.model.question.UserRelationshipEvent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserRelationshipEventMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserRelationshipEvent record);

    int insertSelective(UserRelationshipEvent record);

    UserRelationshipEvent selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserRelationshipEvent record);

    int updateByPrimaryKey(UserRelationshipEvent record);

    /**
     * 根据openid获取
     * @param openid
     * @param event
     * @return
     */
    List<UserRelationshipEvent> selectByOpenid(@Param("openid") String openid, @Param("event") Integer event);

    /**
     * 根据freidnId获取
     * @param openid
     * @param event
     * @return
     */
    List<UserRelationshipEvent> selectByFriendId(@Param("friendOpenid")String openid, @Param("event") Integer event);
}